package com.beans;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/4/4 18:29
 * Bean重命名知识点
 */
public class App2 {
    public static void main(String[] args) {
        ApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("spring-config.xml");
        User getUser = applicationContext.getBean("getUser", User.class);
        User user1 = applicationContext.getBean("user1", User.class);
        User user2 = applicationContext.getBean("user2", User.class);
        User user3 = applicationContext.getBean("user3", User.class);
        System.out.println(getUser);
        System.out.println(user1);
        System.out.println(user2);
        System.out.println(user3);
    }
}
